<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*,java.io.*,java.sql.*,InvestmentPojo.*,ImmovableIndia.*;"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
	<table><tr><td>
		<table width="700" align="center" border="0" cellspacing="0"
			cellpadding="0" valign="middle">
	<%!
	ConnectionPool pool=null;
	public Connection getConnection() throws SQLException, Exception {
		pool=new ConnectionPool();
		return pool.getConnection();
	}
	%>	
  <%java.sql.Connection con=null;
	java.sql.Statement st=null;
	java.sql.ResultSet rs=null;
	String returnValue = "";
	int formid=(Integer)request.getAttribute("formId");
	String dropDownValue=(String)request.getAttribute("dropDownValue");
	try{
	con=getConnection();
	st=con.createStatement();
	rs=st.executeQuery("select * from investment_in_india where list_type_id="+dropDownValue+" and form_id="+formid+" order by option_label");
	List optionsList12= new ArrayList();
	while(rs.next()){
		OptionsList obj = new OptionsList();
		obj.setOptionId(rs.getString(1));
		obj.setListTypeId(rs.getString(2));
		obj.setOptionLabel(rs.getString(3));
		obj.setOptionValue(rs.getString(4));
		obj.setQestFlag(rs.getString(7));
		obj.setShowFlag(rs.getString(8));
		optionsList12.add(obj);
	}if(optionsList12 != null){%>
	 <td colspan='2' ><select class="selectClass" style='width:700px; border-radius: 5px ;' name='qest2' onChange='onSectorChange()' id='sectorid'><font><option default value=''>-----------------------Select One--------------------</option>
		<%for(int i=0;i<optionsList12.size();i++){
		OptionsList obj =(OptionsList)optionsList12.get(i); 
		if(obj.getListTypeId() != null ){%>
			<option style='font:bold' name="<%=obj.getOptionId()%>" id="<%=obj.getOptionId()%>"~"<%=obj.getQestFlag()%>" value="<%=obj.getOptionValue()%>" title="<%=obj.getOptionValue()%>"><%=obj.getOptionLabel()%></option>
		<%}  	
	} 
	}%>
	</select></td>
	<%}catch(Exception e){
		e.printStackTrace();
	}finally{
		try {
			if(null != rs)
				pool.releaseResources(rs);
			System.out.println("Connection RS closed........--------------");
			if(null != st)
				pool.releaseResources(st);
			System.out.println("Connection ST closed........--------------");
			if(null != con)
			pool.releaseConnection(con);
			System.out.println("Connection con closed........--------------");
		} catch (Exception e) {
			e.printStackTrace();
		}
	} %>
		</table></td></tr></table>